# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-defang
_pkgname=defang
pkgver=0.5.3
pkgrel=8
pkgdesc='Defangs and refangs malicious URLs.'
url='https://pypi.org/project/defang/#files'
arch=('any')
license=('GPL3')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('373454e57d2ea43c98dbe8408fd972cdcab3c844c45ea304f6dadf98ea1e753bce3cb1dfce6d2978a73f396195c6861bbc9e30a34a222421f13488de06dc6679')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

